<?php
error_reporting(0);
/* 配置 */
$url = array(
    "Android" => "http://app.cps.com.cn/CPS.apk",
    "iPhone"  => "https://itunes.apple.com/cn/app/cps-zhong-an-wang/id788691329?mt=8",
    "default" => "http://app.cps.com.cn",
);
/* 获取浏览器的 user agent 数据 */
$agent = getenv(HTTP_USER_AGENT);
if(!$agent){
    exit("get user_agent error");
}
/* 浏览器判断 */
if(stripos($agent,'MicroMessenger') != false){
    /* 微信打开 */
    
}elseif(stripos($agent,'Android') != false){
    /* 安卓手机打开 */
    header('Location: '.$url['Android']);
}elseif(stripos($agent,'iPhone') != false || stripos($agent,'ipad') != false || stripos($agent,'ipod') != false ){
    /* 苹果产品打开 */
    header('Location: '.$url['iPhone']);
}elseif(stripos($agent,'UCBrowser') != false ){
    /* UC浏览器打开 */
    header('Location: '.$url['Android']);
}else{
    /* 电脑打开 */
    header('Location: '.$url['default']);
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta content="initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport"/>
<title>CPS客户端下载</title>
<meta content="" name="keywords">
<meta content="" name="description">
<meta content="huanglongfei" name="author"/>
<style>
body{margin: 0;padding: 0;background-color: #F8F8F8;}
i{font-style:normal;}
em{font-style:normal;}
.weixin-tip{width: 270px;height: 325px;margin: 0 auto;color:#999999;font-size:14px;}
.weixin-tip span{color:#FF9000;font-size:15px;vertical-align:top;}
.weixin-tip .s1{height: 50px;line-height:50px;vertical-align:top;text-align:center;}
.weixin-tip .s1 i{display: inline-block;width:45px;height:29px;background:url() no-repeat;-webkit-background-size:45px ;-moz-background-size:45px ;background-size:45px ;vertical-align:top;margin: 10px 5px 0;}
.weixin-tip .s2{height: 120px;line-height:120px;vertical-align:top;position:relative;}
.weixin-tip .s2:before{content:"";display: inline-block;width: 120px;height:120px;border-radius: 60px;background-color: #2F3A3E;}
.weixin-tip .s2 .app{display:block;width: 40px;height: 40px;background:url() no-repeat 6px 6px;-webkit-background-size:27px ;-moz-background-size:27px ;background-size:27px ;background-color: #4A4A4A;border-radius: 3px;border: 3px solid #fff;position:absolute;top: 30px;left:37px;}
.weixin-tip .s2 .app em{display: block;width:90px;height: 20px;color:#fff;line-height:20px;text-align:center;font-size:12px;position:absolute;top:44px;left:-20px;}
.weixin-tip .s2 .txt{display: inline-block;width: 140px;height:30px;line-height:30px;background-color: #fff;border-radius:15px;box-shadow: 1px 1px 2px #777;text-align:center;vertical-align:top;margin-top: 45px;position:relative;}
.weixin-tip .s2 .txt:before{content:"";display:block;width:0;height:0;border-width:9px;overflow:hidden;border-color:transparent #fff transparent transparent;border-style:solid;position:absolute;top: 6px;left: -15px;}
.weixin-tip .s3{height: 45px;line-height:45px;vertical-align:top;text-align:center;}
</style>
</head>
<body>
<div class="weixin-tip" id="JweixinTip">
    <p class="s1"><span>1、</span>点击右上角<i></i></p>
    <p class="s2"><i class="app"><em>在浏览器中打开</em></i><i class="txt"><span>2、</span>在菜单中选择</i></p>
    <p class="s3"><span>3、</span>马上打开或下载App</p>
</div>
</body>
</html>